<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ taglib prefix="h" uri="/hd-tags"%>
    
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>查询受理单</title>
<script type="text/javascript" src="js/datepicker/WdatePicker.js"></script>
<script type="text/javascript" src="js/jquery-1.2.6.js"></script>

<link href="style/main.css" rel="stylesheet" type="text/css"/>
<link href="style/glowtabs.css" rel="stylesheet" type="text/css" />
</head>

<body class="body_content">
<div id="wrap">
	<div id="main" class="clearfix">
	
<jsp:include page="../header.jsp"></jsp:include>

<div class="ricoh_content_k">
	<div class="ricoh_title">--- 查询维修履历 --- </div>
	<div class="ricoh_content_in">
   		<div class="find_k">
   		
   		  <form action="protect_listProtects.action" method="post">
	       	  <div class="find_kd">&nbsp;&nbsp;&nbsp;客户名称：
	            <s:select list="customers" name="repairReport.unitName" id="unitName" listKey="unitName" listValue="%{unitName}" headerKey="" headerValue="请选择客户" theme="simple"></s:select>
	          </div>
	          
	          <div class="find_kd">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;维修人：
	            <s:select list="maintenanceMen" name="repairReport.repairman" id="repairman" listKey="name" listValue="%{name}" headerKey="" headerValue="请选择受理人" theme="simple"></s:select>
	          </div>
	          
	          <div class="find_kd">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;机器号：
	          	<input name="machineNo" id="machineNo" value="${machineNo}"/>
	          </div>
	          
	          <div class="find_kd" >&nbsp;&nbsp;&nbsp;维修时间：
	                      <input name="repairDate" type="text" id="repairDate" class="Wdate" onclick="WdatePicker()" readonly="readonly" size="21"
							onfocus="WdatePicker({dateFmt:'yyyy-MM-dd',alwaysUseStartDate:true})" value="${repairDate}"></input>
	          </div>
	          
	          <p style="padding-top:2px; padding-left:50px;"><input type="submit" name="Submit" value="查询"  class="send_btn"/></p>
          </form>
       
        </div>
        <div class="find_result">
        <table class="result">
			<caption>查询结果：</caption>
			<thead>
				<tr>
					<th width="20%">客户名</th>
				    <th width="20%">机器号</th>
				    <th width="20%">维修人</th>
					<th width="20%">维修时间</th>
				</tr>
			</thead>	
			<tfoot>
				<tr>
					<th>总共:${repairReports.totalCount}条记录</th>
					<td colspan="3">
						<h:pages currentPage="%{currentPage}" url="protect_listProtects.action" totalPage="%{totalPage}" cssClass="pagnation" showPageNumber="3">
							<s:param name="repairReport.unitName" value="repairReport.unitName"></s:param>
							<s:param name="repairReport.repairman" value="repairReport.repairman"></s:param>
							<s:param name="machineNo" value="machineNo"></s:param>
							<s:param name="repairDate" value="repairDate"></s:param>
						</h:pages>
					</td>
				</tr>
			</tfoot>
			<tbody>
				<s:iterator value="repairReports.data" status="repairReport">
					<s:if test="(#repairReport.index)%2==1">
						<tr >
							<th>${unitName}</th>
							<td>${machineNo}</td>
							<td>${repairman}</td>
							<th><h:dateTimeFormat value="repairDate" pattern="yyyy年MM月dd日" type="date"/></th>
						</tr>
					</s:if>
					<s:else>
						<tr class="odd">
							<th>${unitName}</th>
							<td>${machineNo}</td>
							<td>${repairman}</td>
							<th><h:dateTimeFormat value="repairDate" pattern="yyyy年MM月dd日" type="date"/></th>
						</tr>
					</s:else>
				</s:iterator>
			</tbody>		
		</table>
        </div>
  </div>
</div>

</div>
</div>

<jsp:include page="../footer.jsp"></jsp:include>

</body>
<script type="text/javascript" src="js/ddtabmenu.js"></script>
<script type="text/javascript">
ddtabmenu.definemenu("ddtabs2", 4);

</script>
</html>
